{require_min_otp_vsn, "19"}.

{erl_opts, [
    {parse_transform, lager_transform},

    %% OTP version specific defines
    {platform_define, "^(19|2)", rand_only},
    {platform_define, "^(1|20)", fun_stacktrace},
    {platform_define, "^1", no_keyserver}
]}.

{deps, [
    {lager, "3.8.0"},
%    {depcache, "1.7.0"},
    {depcache, {git, "https://github.com/zotonic/depcache.git", {branch, "master"}}},

    {exometer_core, "1.5.7"},
    {bert, "0.1.0"},
    {dh_date, "1.0.0"},
    {poolboy, "1.5.1"},
    {epgsql, "4.3.0"},
    {erlware_commons, "1.3.1"},
    {erlang_localtime, "1.0.0"},
    {gproc, "0.8.0"},
    {parse_trans, "3.3.0"},
    {proper, "1.2.0"},
    {recon, "2.4.0"},
    {meck, "0.8.13"},
    {edown, "0.8.1"},
    {shotgun, "0.3.0"},
    {bcrypt, "1.0.2"},
    {diffy, "1.0.0"},
    {eiconv, "1.0.0"},
    {erlpass, "1.0.4"},
%    {gen_smtp, "0.15.0"},
    {gen_smtp, {git, "https://github.com/gen-smtp/gen_smtp.git", {branch, "0.x"}}},
    {mimetypes, "1.1.0"},
    {mochiweb, "2.20.1"},
    {jsx, "2.9.0"},
    {jsxrecord, "1.0.2"},
    {sidejob, "2.1.0"},
    {jobs, "0.9.0"},
    {filezcache, "1.0.1"},
    {yamerl, "0.7.0"},

%    {zotonic_stdlib, "1.0.3"},
%    {template_compiler, "1.2.0"},
    {dispatch_compiler, "1.0.0"},
    {cowmachine, "1.3.0"},
    {zotonic_ssl, "1.0.2"},

    {mqtt_sessions, {git, "https://github.com/zotonic/mqtt_sessions.git", {branch, "master"}}},
    {template_compiler, {git, "https://github.com/zotonic/template_compiler.git", {branch, "master"}}},
    {zotonic_stdlib, {git, "https://github.com/zotonic/z_stdlib.git", {branch, "master"}}},

    {s3filez, "1.0.0"},
    {qdate_localtime, {git, "https://github.com/choptastic/qdate_localtime.git", {branch, "master"}}},
    {qdate, {git, "https://github.com/choptastic/qdate.git", {branch, "master"}}},
    {exif, {git, "https://github.com/nlfiedler/erlang-exif.git", {branch, "master"}}},
    {syslog, {git, "https://github.com/Vagabond/erlang-syslog.git", {branch, "master"}}},
    {oauth, ".*", {git, "https://github.com/tim/erlang-oauth.git", {tag, "v1.6.0"}}},
    {keyserver, ".*", {git, "https://github.com/channelme/keyserver.git", {branch, "master"}}}
]}.

{plugins, [pc]}.

{overrides, [
    {override, syslog, [
        {plugins, [pc]},
        {artifacts, ["priv/syslog_drv.so"]},
        {provider_hooks, [
            {post, [
                {compile, {pc, compile}},
                {clean, {pc, clean}}
            ]}
        ]}
    ]}
]}.

{xref_checks, [
    undefined_function_calls,
    locals_not_used,
    deprecated_function_calls
]}.
